﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Picture_Manage_Dialog_4.aspx.cs"
    Inherits="V5_EShop.Admin.Picture.Picture_Manage_Dialog_4"%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>图片管理</title>
    <link href="css/Styles.css" type="text/css" rel="Stylesheet" />
    <style>
        .lightbox { width: 400px; height: 100px; background: #FFFFFF; top: 20%; left: 20%; border: 1px solid #ccc; padding: 3px; display: none; font-size: 12px; }
    </style>
</head>
<body style="overflow: auto;">

    <script type="text/javascript" src="${site.res_dir}scripts/LightBox.js"></script>

    <div style="width: 100%; text-align: right;">
        <input type="button" class="ButtonOrange" value="图片添加" onclick="AddPic()" />
    </div>
    <form id="form1" runat="server">
    <asp:DataList ID="DataList1" runat="server">
        <ItemTemplate>
        </ItemTemplate>
    </asp:DataList>
    </form>
    <div class="lightbox" id="idBox" style="text-align: center;">
        <form method="post" action="Picture_Manage_Dialog_4.aspx?Act=Add" id="form_add" enctype="multipart/form-data">
        小图：
        <input type="file" name="pic1_s" /><br />
        大图：<input type="file" name="pic1" /><br />
        <br />
        每张图片大小不超过512KB,小图用于前台缩略图
        <br />
        <input type="hidden" name="productid" value="147" />
        <div>
            <input type="button" value="提交" class="ButtonOrange" onclick="javascript:form_add.submit();" />&nbsp;
            <input type="button" value="取消" onclick="javascript:box.Close();" class="ButtonOrange" />
        </form>
    </div>
    <div id="idOverlay">
    </div>
    <div class="lightbox" id="idBox_edit" style="text-align: center;">
        <form method="post" action="Picture_Manage_Dialog_4.aspx?Act=Edit" id="form_edit"
        enctype="multipart/form-data">
        图片：<input type="file" name="pic_edit" /><br />
        <br />
        每张图片大小不超过512KB
        <br />
        <input type="hidden" name="productid" value="147" />
        <input type="hidden" name="_index" id="_index" />
        <input type="hidden" name="_picid" id="_picid" />
        <div>
            <input type="button" value="提交" class="ButtonOrange" onclick="javascript:form_edit.submit();" />&nbsp;
            <input type="button" value="取消" onclick="javascript:box.Close();" class="ButtonOrange" />
        </form>
    </div>

    <script type="text/javascript" language="javascript">
        var box;
        function AddPic() {
            box = new LightBox("idBox", { Center: true, Fixed: true, Lay: "idOverlay", Color: "#FFFFFF", Opacity: "0" });
            box.Show();
        }

        function EditPic(picid, _index) {
            box = new LightBox("idBox_edit", { Center: true, Fixed: true, Lay: "idOverlay", Color: "#FFFFFF", Opacity: "0" });
            box.Show();
            document.getElementById("_index").value = _index;
            document.getElementById("_picid").value = picid;

        }
    </script>

</body>
</html>
